<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <style>
        body {
            color: #000000;
            font-size: 14px;
        }

        .secondary {
            color: #525252;
        }

        .summary,
        .passengers,
        .flights,
        .prices {
            width: 100%;
            border-collapse: collapse;
        }

        .summary td {
            border-bottom: #dcdcdc 1px solid;
            padding: 12px 0;
            text-align: left;
        }

        .title {
            font-weight: bold;
            margin-top: 32px;
            color: #000000;
            margin-bottom: 10px;
            font-size: 15px;
        }

        .passengers td,
        .passengers th,
        .flights th,
        .flights td,
        .prices th,
        .prices td {
            border-collapse: collapse;
            border: #dcdcdc 1px solid;
            padding: 6px;
            text-align: center;
        }

        .flights td {
            padding: 16px 6px;
            text-align: left;
        }

        .float-title {
            float: left;
            width: 50%;
            margin-bottom: 10px;
        }

        .hint {
            font-weight: bold;
            color: #8c8c8c;
            font-size: 12px;
            text-align: right;
            float: right;
            width: 50%;
        }

        .agencyInfo {
            text-align: right;
        }
    </style>
</head>

<body>
<div class="box">
    {{ if eq .Lang "zh" }}
        <table class="summary">
            <tr>
                <td width="25%" class="secondary">航空公司记录编号</td>
                <td width="25%">
                    {{ range $airlinePnr := .Aline.AirlinePnr }}
                        {{ if ne $airlinePnr "" }}
                            {{ $airlinePnr }}
                        {{end}}
                    {{ end }}
                </td>
                <td width="25%" class="secondary">订座记录编号</td>
                <td width="25%">
                    {{ range $pnr := .Aline.Pnr }}
                        {{ if ne $pnr "" }}
                            {{ $pnr }}
                        {{ end }}
                    {{ end }}
                </td>
            </tr>
            <tr>
                <td class="secondary">出票航空公司</td>
                <td>{{ .Aline.MarketingCarrier }}</td>
                <td class="secondary">出票时间</td>
                <td>
                    {{ range $issueDate := .Aline.Issue }}
                        {{ if ne $issueDate "" }}
                            {{ $issueDate }}
                        {{ end }}
                    {{ end }}
                </td>
            </tr>
        </table>
        <div class="title">旅客信息</div>
        <table class="passengers">
            <tr>
                <td><span class="secondary">旅客姓名</span></td>
                <td><span class="secondary">性别</span></td>
                <td><span class="secondary">类型</span></td>
                <td><span class="secondary">证件</span></td>
                <td><span class="secondary">票号</span></td>
            </tr>
            {{ range $passenger := .Passengers }}
            <tr>
                <td>{{ $passenger.Name }}</td>
                <td>{{ $passenger.Gender }}</td>
                <td>{{ $passenger.Type }}</td>
                <td>{{ $passenger.Travel.Type }}&emsp;{{ $passenger.Travel.Number }}</td>
                <td>{{ $passenger.Ticket.No }}</td>
            </tr>
            {{ end }}
        </table>
        <div class="title">
            <div class="float-title">行程信息</div>
            <div class="hint"> * 起飞/到达时间均为当地时间 </div>
        </div>
        <table class="flights">
            <tr>
                <td><span class="secondary">航班/舱等</span></td>
                <td><span class="secondary">出发/到达</span></td>
                <td><span class="secondary">行程/航站楼</span></td>
                <td><span class="secondary">停留/飞行时间</span></td>
                <td><span class="secondary">行李</span></td>
            </tr>
            {{ range $segment := .Segments }}
            <tr>
                <td>
                    <div style="color: #000000;">{{ $segment.FlightNo }}</div>
                    <div style="font-size: 4px;color: white;">-</div>
                    <div>{{ $segment.CabinClass }}</div>
                </td>
                <td>
                    <div>{{ $segment.DepartureDate }}</div>
                    <div style="font-size: 4px;color: white;">-</div>
                    <div>{{ $segment.ArrivalDate }}</div>
                </td>
                <td>
                    <div> <span style="color: #000000;"> {{ $segment.Departure }} </span> &emsp;&emsp;{{ $segment.DepartureTerminal }}</div>
                    <div style="font-size: 4px;color: white;">-</div>
                    <div> <span style="color: #000000;"> {{ $segment.Arrival }} </span> &emsp;&emsp;{{ $segment.ArrivalTerminal }}</div>
                </td>
                <td>
                    <div>{{ $segment.Stop }}</div>
                    <div style="font-size: 4px;color: white;">-</div>
                    <div>{{ $segment.Duration }}</div>
                </td>
                <td>
                    {{ range $baggageIndex, $baggage := $segment.Baggage }}
                    <div>{{ $baggage }}</div>
                    {{ if eq $baggageIndex 0 }}
                    <div style="font-size: 4px;color: white;">-</div>
                    {{ end }}
                    {{ end }}
                </td>
            </tr>
            {{ end }}
        </table>
        {{ if gt (len .PriceDetail.Detail) 0 }}
            <div class="title">
                <div class="float-title">票价信息</div>
                <div class="hint"> 币种: CNY </div>
            </div>
            <table class="prices">
                <tr>
                    <td><span class="secondary">乘客类型</span></td>
                    <td><span class="secondary">机票款</span></td>
                    <td><span class="secondary">税金</span></td>
                    <td><span class="secondary">服务费</span></td>
                    <td><span class="secondary">人数</span></td>
                    <td><span class="secondary">合计</span></td>
                </tr>
                {{ range $price := .PriceDetail.Detail }}
                <tr>
                    <td>{{ $price.Type }}</td>
                    <td>{{ $price.FlightPrice }}</td>
                    <td>{{ $price.Tax }}</td>
                    <td>{{ $price.ServiceFee }}</td>
                    <td>x {{ $price.Num }}</td>
                    <td align="right">{{ $price.Total }}</td>
                </tr>
                {{ end }}
                <tr>
                    <td>总额</td>
                    <td colspan="5" align="right">{{ .PriceDetail.Sum }}</td>
                </tr>
            </table>
        {{ end }}
        <div class="detail">
            <div class="remind">
                <h4>提醒您注意:</h4>
                <p>1.国内航班请提前90分钟，国际航班请提前2个小时到达机场，办理乘机和安检手续。</p>
                <p>2.请确认乘机人姓名跟护照或身份证相同并核实所有机票上的信息，否则航空公司有权拒绝登机。</p>
                <p>3.根据国际航协运输协会的规定，机票必须按顺序使用，否则您将承担所有由此引起的后果。</p>
                <p>4.请在出发前确认您持有至少超过6个月有效期及有足够空白签证页的护照，并确保所有行程在签证有效期内。</p>
            </div>
            <div class="Disclaimers">
                <h4>免责声明:</h4>
                <p>以上所展示的航班、舱位、机型、起飞时间、到达时间、行李、价格信息仅供参考，在出票前可能发生变动。另，航班可能因为天气等原因受到影响，造成延误或取消，请您实时关注航班变化，与所乘航空公司密切沟通。</p>
            </div>
        </div>
    {{ else if eq .Lang "en" }}
            <table class="summary">
                <tr>
                    <td width="25%" class="secondary">Airline Reference</td>
                    <td width="25%">
                        {{ range $airlinePnr := .Aline.AirlinePnr }}
                            {{ if ne $airlinePnr "" }}
                                {{ $airlinePnr }}
                            {{end}}
                        {{ end }}
                    </td>
                    <td width="25%" class="secondary">PNR</td>
                    <td width="25%">
                        {{ range $pnr := .Aline.Pnr }}
                            {{ if ne $pnr "" }}
                                {{ $pnr }}
                            {{ end }}
                        {{ end }}
                    </td>
                </tr>
                <tr>
                    <td class="secondary">Marketing Carrier</td>
                    <td>{{ .Aline.MarketingCarrier }}</td>
                    <td class="secondary">Date of issue</td>
                    <td>
                        {{ range $issueDate := .Aline.Issue }}
                            {{ if ne $issueDate "" }}
                                {{ $issueDate }}
                            {{ end }}
                        {{ end }}
                    </td>
                </tr>
        </table>
        <div class="title">Passenger Information</div>
        <table class="passengers">
            <tr>
                <td><span class="secondary">Passenger Name</span></td>
                <td><span class="secondary">Gender</span></td>
                <td><span class="secondary">Type</span></td>
                <td><span class="secondary">Travel Document</span></td>
                <td><span class="secondary">Ticket Number</span></td>
            </tr>
            {{ range $passenger := .Passengers }}
                <tr>
                    <td>{{ $passenger.Name }}</td>
                    <td>{{ $passenger.Gender }}</td>
                    <td>{{ $passenger.Type }}</td>
                    <td>{{ $passenger.Travel.Type }}&emsp;{{ $passenger.Travel.Number }}</td>
                    <td>{{ $passenger.Ticket.No }}</td>
                </tr>
            {{ end }}
        </table>
        <div class="title">
            <div class="float-title">Itinerary Information</div>
            <div class="hint"> * Departure/Arrival time is local time </div>
        </div>
        <table class="flights">
            <tr>
                <td><span class="secondary">Flight/Class</span></td>
                <td><span class="secondary">Departure/Arrival</span></td>
                <td><span class="secondary">Route/Terminal</span></td>
                <td><span class="secondary">Stop/Duration</span></td>
                <td><span class="secondary">Baggage</span></td>
            </tr>
            {{ range $segment := .Segments }}
            <tr>
                <td>
                    <div style="color: #000000;">{{ $segment.FlightNo }}</div>
                    <div style="font-size: 4px;color: white;">-</div>
                    <div>{{ $segment.CabinClass }}</div>
                </td>
                <td>
                    <div>{{ $segment.DepartureDate }}</div>
                    <div style="font-size: 4px;color: white;">-</div>
                    <div>{{ $segment.ArrivalDate }}</div>
                </td>
                <td>
                    <div> <span style="color: #000000;"> {{ $segment.Departure }} </span> &emsp;&emsp;{{ $segment.DepartureTerminal }}</div>
                    <div style="font-size: 4px;color: white;">-</div>
                    <div> <span style="color: #000000;"> {{ $segment.Arrival }} </span> &emsp;&emsp;{{ $segment.ArrivalTerminal }}</div>
                </td>
                <td>
                    <div>{{ $segment.Stop }}</div>
                    <div style="font-size: 4px;color: white;">-</div>
                    <div>{{ $segment.Duration }}</div>
                </td>
                <td>
                    {{ range $baggageIndex, $baggage := $segment.Baggage }}
                        <div>{{ $baggage }}</div>
                        {{ if eq $baggageIndex 0 }}
                            <div style="font-size: 4px;color: white;">-</div>
                        {{ end }}
                    {{ end }}
                </td>
            </tr>
            {{ end }}
        </table>
        {{ if gt (len .PriceDetail.Detail) 0 }}
            <div class="title">
                <div class="float-title">Ticket Information</div>
                <div class="hint"> Currency: CNY </div>
            </div>
            <table class="prices">
                <tr>
                    <td><span class="secondary">Passenger Type</span></td>
                    <td><span class="secondary">Air Ticket Payment</span></td>
                    <td><span class="secondary">Taxes</span></td>
                    <td><span class="secondary">Service Fee</span></td>
                    <td><span class="secondary">Number Of People</span></td>
                    <td><span class="secondary">Total Price</span></td>
                </tr>
                {{ range $price := .PriceDetail.Detail }}
                    <tr>
                        <td>{{ $price.Type }}</td>
                        <td>{{ $price.FlightPrice }}</td>
                        <td>{{ $price.Tax }}</td>
                        <td>{{ $price.ServiceFee }}</td>
                        <td>x {{ $price.Num }}</td>
                        <td align="right">{{ $price.Total }}</td>
                    </tr>
                {{ end }}
                <tr>
                    <td>Total amount</td>
                    <td colspan="5" align="right">{{ .PriceDetail.Sum }}</td>
                </tr>
            </table>
        {{ end }}
        <div class="detail">
            <div class="remind">
                <h4>Notice:</h4>
                <p>1. For check-in and security check, please arrive at the airport 90 minutes in advance for domestic flights and 2 hours for international flights.</p>
                <p>2. Please ensure that passenger name is same as the passport or ID card and verify all the information on the ticket. Otherwise, airline have rights to deny boarding.</p>
                <p>3. According to IATA regulations, all the air tickets must be used in sequence, or you may incur all the penalty and loss of the ticket.</p>
                <p>4. Please be sure to obtain valid visa with enough blank visa pages in your passport and ensure the validity of your passport is beyond 6 months at time of departure. Meanwhile, kindly make sure your whole travel time is in the period of the visa validity.</p>
            </div>
            <div class="Disclaimers">
                <h4>Disclaimer:</h4>
                <p>The flight information, booking class, aircraft type, schedule time, baggage allowance and ticket fare above shown are only for reference. All the information may be updated before issuing ticket.</p>
                <p>In addition, flight may be affected by weather or other reason and result in delay or cancellation.For the latest flight status, please contact and check with carrier.</p>
            </div>
        </div>
    {{ end }}
    {{ if ne .Agency.Id 0 }}
    <div class="agencyInfo">
        <img src="{{ .Agency.Logo }}" height="48">
        <p>{{ .Agency.Name }}</p>
    </div>
    {{ end }}
</div>
</body>

</html>